package priv.lirenhe.javasuper.thread.other;

public class TaskSleep implements Runnable{

	public TaskSleep() {
		System.out.println("TaskSleep init");
	}

	@Override
	public void run() {
		int i = 0;
		while(true){
			System.out.println(Thread.currentThread().getName() + "正在输出：" + i++);
			if(i == 10 && Thread.currentThread().getName().equals("maxP")){
				System.out.println("maxP sleep");
				try {
					Thread.sleep(1000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}
		
	}

}
